<script type="text/javascript">
    function submitForm()
    {        
        var tieude = $('#tieude'); 
        tieude.removeClass('text-warning');          
        var isValid = true;
        if(tieude.val() == '') 
        {
            if(tieude.val() == '') tieude.addClass('text-warning');                       
            isValid = false;   
        }
        for(var i in CKEDITOR.instances) 
        {
            CKEDITOR.instances[i].updateElement();
        }
        if(isValid) $('#frm').submit();
    }  
</script>
<div class="top-bar">
    <h1><?php echo $info; ?></h1>
	<div class="breadcrumbs">
        <a href="#">Trang chủ</a> / <a href="#">Quản lý thông báo</a>/ <a href="#">Viết thông báo</a>
    </div>   
</div>

    <div class="table">
    <img src="<?php echo base_url('assets/imgs/admin/bg-th-left.gif') ?>" width="8" height="7" alt="" class="left" />
				<img src="<?php echo base_url('assets/imgs/admin/bg-th-right.gif')?>" width="7" height="7" alt="" class="right" />
        
        <form method="post" id="frm" action="<?php echo base_url('adcp/quanlythongbao/vietthongbaomoi') ?>" enctype="multipart/form-data">
            <table class="listing form" cellpadding="0" cellspacing="0">
			<tr>
				<th class="full" colspan="2"></th>
			</tr>
			<tr>
				<td class="first" width="172"><strong>Tiêu đề (*)</strong></td>
				<td class="last"><input type="text" id="tieude" name="tieude" class="text" /></td>
			</tr>
	<!--
            <tr class="bg">
                <td class="first" width="172"><strong>Ảnh đại diện bài viết</strong> <br /></td>
                <td></td>				
            </tr>
            <tr>
                <td class="first" width="172">Upload <br /> <i>(.png, .bmp, .jpg)</i></td>
				<td class="last"><input type="file" id="uploadImage" class="uploadImage" name="uploadImage"/></td>
            </tr>		
            <tr class="bg">
                <td class="first" width="172">hoặc <input type="checkbox" id="chkInputLink" name="chkInputLink"/> Nhập đường dẫn <br /></td>
				<td class="last"><input type="text" id="linkimage" disabled="disabled" class="text linkimage" name="linkimage"/></td>
            </tr>-->
		</table>
            <textarea name="editor" id="editor" rows="30" cols="80"></textarea>
            <script>                
                CKEDITOR.replace('editor', {
                	language: 'vi'
                });
                
            </script>                        
             <button id="btnSubmit" onclick="submitForm()">
                    <img src="<?php echo base_url('assets/imgs/admin/save-icon.gif') ?>"/>
                    <label style="vertical-align: top;">Đăng thông báo mới</label>
             </button> 
        </form>
</div>